import { IPSDEWizardStep } from './ipsdewizard-step';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysCss } from '../../res/ipssys-css';
import { IPSSysImage } from '../../res/ipssys-image';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEWizardStepImpl extends PSModelObjectImpl implements IPSDEWizardStep {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected pssysimage: IPSSysImage | null = null;

  getPSSysImage(): IPSSysImage | null {
    if (this.pssysimage != null) return this.pssysimage;
    const value = this.M.getPSSysImage;
    if (value == null) {
      return null;
    }
    this.pssysimage = this.getPSModel4('res.IPSSysImage', value, 'getPSSysImage') as IPSSysImage;
    return this.pssysimage;
  }

  get psSysImage(): IPSSysImage | null {
    return this.getPSSysImage();
  }

  getPSSysImageMust(): IPSSysImage {
    const value = this.getPSSysImage();
    if (value == null) {
      throw new Error('未指定图标资源对象');
    }
    return value;
  }

  get stepTag(): string {
    return this.M.stepTag;
  }

  get subTitle(): string {
    return this.M.subTitle;
  }

  protected subtitlepslanguageres: IPSLanguageRes | null = null;

  getSubTitlePSLanguageRes(): IPSLanguageRes | null {
    if (this.subtitlepslanguageres != null) return this.subtitlepslanguageres;
    const value = this.M.getSubTitlePSLanguageRes;
    if (value == null) {
      return null;
    }
    this.subtitlepslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getSubTitlePSLanguageRes') as IPSLanguageRes;
    return this.subtitlepslanguageres;
  }

  get subTitlePSLanguageRes(): IPSLanguageRes | null {
    return this.getSubTitlePSLanguageRes();
  }

  getSubTitlePSLanguageResMust(): IPSLanguageRes {
    const value = this.getSubTitlePSLanguageRes();
    if (value == null) {
      throw new Error('未指定子抬头语言资源对象');
    }
    return value;
  }

  get title(): string {
    return this.M.title;
  }

  protected titlepslanguageres: IPSLanguageRes | null = null;

  getTitlePSLanguageRes(): IPSLanguageRes | null {
    if (this.titlepslanguageres != null) return this.titlepslanguageres;
    const value = this.M.getTitlePSLanguageRes;
    if (value == null) {
      return null;
    }
    this.titlepslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getTitlePSLanguageRes') as IPSLanguageRes;
    return this.titlepslanguageres;
  }

  get titlePSLanguageRes(): IPSLanguageRes | null {
    return this.getTitlePSLanguageRes();
  }

  getTitlePSLanguageResMust(): IPSLanguageRes {
    const value = this.getTitlePSLanguageRes();
    if (value == null) {
      throw new Error('未指定抬头语言资源对象');
    }
    return value;
  }

  protected titlepssyscss: IPSSysCss | null = null;

  getTitlePSSysCss(): IPSSysCss | null {
    if (this.titlepssyscss != null) return this.titlepssyscss;
    const value = this.M.getTitlePSSysCss;
    if (value == null) {
      return null;
    }
    this.titlepssyscss = this.getPSModel4('res.IPSSysCss', value, 'getTitlePSSysCss') as IPSSysCss;
    return this.titlepssyscss;
  }

  get titlePSSysCss(): IPSSysCss | null {
    return this.getTitlePSSysCss();
  }

  getTitlePSSysCssMust(): IPSSysCss {
    const value = this.getTitlePSSysCss();
    if (value == null) {
      throw new Error('未指定抬头样式表对象');
    }
    return value;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get enableLink(): boolean {
    return this.M.enableLink;
  }

  get cls(): string {
    return 'PSDEWizardStepImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.wizard.IPSDEWizardStep') return true;
    return super.instanceof(cls);
  }
}
